@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.talk-item {
    display: flex;

    .search-btn,
    .search-btn-ai {
        display: none;
    }

    .img-box {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        overflow: hidden;
        margin: 0 5px;
        border: 1px solid #e3e3e3;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .img-box>img {
        width: inherit;
        height: inherit;
    }

    .talk-content {
        max-width: 70%;
        word-break: break-all;
        background: #eef6ff;
        border: 1px solid #e7e7e7;
        border-radius: 4px;
        padding: 0 10px;
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #333330;
        font-weight: 400;

        p {
            margin: 14px 0 !important;
        }

        .content-box-loading {
            position: relative;
            height: 100%;
            width: 8px;

            &::after {
                position: absolute;
                top: 50%;
                bottom: 0;
                transform: translateY(-50%);
                content: "_";
                /* 必须设置 content 属性，即使为空 */
                height: 19px;
                // width: 100%;
                width: 8px;
                /* 光标的宽度 */
                color: transparent;
                background-color: rgba(0, 0, 0, 0.5);
                /* 光标的颜色 */
                animation: blink 0.5s step-end infinite;
                /* 闪烁效果 */
            }
        }
    }
}

.talk-item-ai {
    .talk-content {
        background: #fafafa;
        position: relative;
    }

    &:last-of-type {

        &:hover .search-btn-ai {
            display: block;
            position: absolute;
            top: 0;
            right: 0;
            transform: translateY(calc(-100% - 2px));
            background: #e3e3e3;
            border-radius: 5px 5px 0 0;
            color: #7d7d7d;
            padding: 5px;
            cursor: pointer;
            font-size: 12px;
        }
    }
}

.talk-item-user {
    flex-direction: row-reverse;

    .talk-content {
        background: #fafafa;
        position: relative;
    }

    &:hover .search-btn {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        transform: translateY(calc(-100% - 2px));
        background: #e3e3e3;
        border-radius: 5px 5px 0 0;
        color: #7d7d7d;
        padding: 5px;
        cursor: pointer;
        font-size: 12px;
    }
}

.talk-item+.talk-item {
    margin-top: 30px;
}